package reflect;



public class Student extends  Person{

    private final String[] address= {"南京","上海"};
    public Double grade;
    private    String s = "55";


    public String getS() {
        return s;
    }

    public void setS(String s) {

    }

    public Student() {

//        s="xff";
    }

    public void test2(Student student){
        System.out.println("student");
    }

/*    public void test2(Person p){
        System.out.println("student2");
    }*/

//    private Student(String address, int grade) {
//    //    this.address = address;
//        this.grade = grade;
//    }
//
//    public Student(String name, int age, String address, int grade) {
//        super(name, age);
//        this.address = address;
//        this.grade = grade;
//    }

    public String getAddress() {
        return address[0]+address[1];
    }

//    public void setAddress(String address) {
//        this.address = address;
//    }

    public double getGrade() {
        return grade;
    }

    public void setGrade(double grade) {
        this.grade = grade;
    }

    private  void add(Double a,String b){
        System.out.println(a+b);
    }


    @Override
    public String toString() {
        return "Student{" +
                "age=" + age +
                ", address='" + address + '\'' +
                ", grade=" + grade +
                '}';
    }

    public static void main(String[] args) {
        Student person=new Student();
        person.test();
    }
}
